1. Field
This disclosure relates generally to multimedia applications in a computing system, and more specifically but not exclusively, to method and apparatus for maintaining synchronization of audio during audio playback.
2. Description
Most of today's computing platforms are not very efficient in the way they execute various audio workloads, which results in more power consumption compared to fixed-function devices such as cellular phones and MP3 players. One reason for this inefficiency may be due to the lack of robust hardware buffering which limits the amount of time the audio controller's Direct Memory Access (DMA) engines can remain idle before needing to service the audio workload. Without the capability for robust hardware buffering, a system may be forced to favor either audio quality (e.g., fidelity and responsiveness) or reduction of power consumption. In a typical computing system nowadays, both objectives cannot be achieved simultaneously. For example, on one hand, some Operating Systems (OS) uses relatively small audio buffers (e.g., only capable for buffering 40-80 milliseconds of audio), but tries to achieve high audio quality in terms of fidelity and responsiveness. On the other hand, some hardware audio controller uses a very small hardware buffer (e.g., only capable for buffering a few microseconds worth of low-fidelity audio). The combination of software and hardware buffering components results in frequent bus-mastering DMA and processor interrupts which in turn significantly increases platform power consumption and precludes the use of advanced power management techniques in the future.
Although more power-efficient audio playback may be achieved by buffering larger amounts of audio data (in the OS as well as the hardware audio controller), this approach, by itself, may increase the end-to-end latency. Typically, the maximum acceptable delay for audio before a user may detect audible side-effects is 100-150 ms (for a single event). This latency is measured from the time an event causing a sound to be sent to the audio subsystem to the time the sound is actually rendered at the speaker. Certain types of audio workloads such as VoIP (Voice over Internet Protocol) may have even more stringent latency requirement to account for possible external delays such as those occurring during network propagation. Other workloads like movie playback require fairly stringent synchronization between audio and video feeds. Therefore, it is desirable to design an audio subsystem in a computing system which can achieve both objectives of good quality and low power consumption.